<?php

namespace app\api\controller;

use hg\apidoc\annotation as Apidoc;
use hg\apidoc\annotation\Param;
use hg\apidoc\annotation\Query;
use hg\apidoc\annotation\Returned;
use hg\apidoc\annotation\Header;
use app\BaseController;
use think\facade\View;
use think\facade\Db;
use think\response\Json;
/**
 * 聊天会员记录
 *
 * api-ChatVipRecords
 *
 * @Apidoc\Title("聊天会员记录")
 * @Apidoc\Group("api")
 */
class ChatVipRecords extends Auth
{
    /**
     *  @Apidoc\Title ("chatdog充值Vip明细")
     * list
     */
    public function list()
    {
        $list_rows = input('list_rows', 10, 'intval');
        $data = \app\common\model\ChatVipRecords::where('member_id', $this->request->uid)
            ->withAttr('end_time', function ($val, $data){
                return date('Y-m-d H:i:s', $val);
            })
            ->order('id', 'desc')
            ->paginate($list_rows);
        return success('', $data);
    }
}
